//
//  LSAttendanceManagementTableViewCell.m
//  LaSaCivilAffairsDepartment
//
//  Created by 聂志康 on 2019/1/24.
//  Copyright © 2019 wpkj. All rights reserved.
//

#import "LSAttendanceManagementTableViewCell.h"

@implementation LSAttendanceManagementTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self.contentView addSubview:self.mainTitleLabel];
        [self.contentView addSubview:self.mainSubtitleLabel];
        [self.contentView addSubview:self.mainStatusLabel];
        [self.contentView addSubview:self.mainTimeLabel];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    WS
    [self.mainTitleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.contentView.mas_left).with.offset(15);
        make.top.equalTo(weakSelf.contentView.mas_top).with.offset(10);
    }];
    [self.mainSubtitleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.mainTitleLabel.mas_right).with.offset(20);
        make.bottom.equalTo(weakSelf.mainTitleLabel.mas_bottom);
    }];
    [self.mainStatusLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(weakSelf.contentView.mas_right).with.offset(-15);
        make.top.equalTo(weakSelf.contentView.mas_top).with.offset(35);
    }];
    [self.mainTimeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(weakSelf.mainStatusLabel.mas_left).with.offset(-20);
        make.top.equalTo(weakSelf.contentView.mas_top).with.offset(35);
        make.left.equalTo(weakSelf.contentView.mas_left).with.offset(15);
    }];
}

- (UILabel *)mainTitleLabel {
    if (!_mainTitleLabel) {
        _mainTitleLabel = [[UILabel alloc] init];
        _mainTitleLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:15];
        _mainTitleLabel.textColor = hexColor(333333);
    }
    return _mainTitleLabel;
}
- (UILabel *)mainSubtitleLabel {
    if (!_mainSubtitleLabel) {
        _mainSubtitleLabel = [[UILabel alloc] init];
        _mainSubtitleLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:13];
        _mainSubtitleLabel.textColor = hexColor(333333);
    }
    return _mainSubtitleLabel;
}
- (UILabel *)mainTimeLabel {
    if (!_mainTimeLabel) {
        _mainTimeLabel = [[UILabel alloc] init];
        _mainTimeLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:13];
        _mainTimeLabel.textColor = hexColor(666666);
    }
    return _mainTimeLabel;
}
- (UILabel *)mainStatusLabel {
    if (!_mainStatusLabel) {
        _mainStatusLabel = [[UILabel alloc] init];
        _mainStatusLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:13];
        _mainStatusLabel.textColor = hexColor(E32223);
        _mainStatusLabel.textAlignment = NSTextAlignmentRight;
    }
    return _mainStatusLabel;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
